import json
import os

from openai import OpenAI

api_key=os.environ.get('DEEPSEEK_API_KEY')
# for backward compatibility, you can still use `https://api.deepseek.com/v1` as `base_url`.
client = OpenAI(api_key=api_key, base_url="https://api.deepseek.com")
models=client.models.list()
print(models)

with open('enable_models.txt','w+')as file:
    json.dump(str(models),file)